package com.sc.nft.dao;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.PropEquityVestIn;
import com.sc.nft.entity.dto.PageAdminEquityPropsVistInDTO;
import com.sc.nft.entity.vo.PageAdminEquityPropsVistInVO;
import com.sc.nft.mapper.PropEquityVestInMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
* @author PC
* @description 针对表【sc_prop_equity_vest_in】的数据库操作Dao
* @createDate 2024-10-14 18:01:20
*/
@Slf4j
@Repository
public class PropEquityVestInDao extends ServiceImpl<PropEquityVestInMapper, PropEquityVestIn> {

    public PropEquityVestIn getFlag(String flag) {
        LambdaQueryWrapper<PropEquityVestIn> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(PropEquityVestIn::getFlag, flag);
        wrapper.last("limit 1");
        return getOne(wrapper);
    }

    public IPage<PageAdminEquityPropsVistInVO> getPageAdminEquityPropsVistIn(PageAdminEquityPropsVistInDTO request) {
        return baseMapper.getPageAdminEquityPropsVistIn(request.toMp(),request);
    }
}
